<?php
class JiuHAppController extends ApiController
{
	public function actionList(){
		$data = new HayApiDatabase();
		$data->Tablename = 'news';
		$data->SearField = 'title';
		$data->Array = array(
			'listContent'=>'description',
    		'listID '=>'id',
    		'listImageURL'=>'cover',
    		'listTitle'=>'title',
		);
		$data->LastId = isset($_GET['lastID'])?$_GET['lastID']:'0';
		$data->Limit = isset($_GET['number'])?$_GET['number']:'10';
		$data->ListLtype = isset($_GET['listType'])?$_GET['listType']:'0';
		$data->SearchText = isset($_GET['searchText'])?$_GET['searchText']:'';
		$data->Field = 'cate_id';
		return $data->JsonDatas();
	}
	public function actionListMsg()
	{
		$data = new HayApiMsgDatabase();
		$data->Tablename = 'news';
		$data->Array = array(
			'listMsgContent'=>'description',
    		'listMsgImageURL'=>'cover',
    		'listMsgTitle'=>'title',
		);
		$data->LastId = isset($_GET['listID'])?$_GET['listID']:'';
		$data->Limit = isset($_GET['number'])?$_GET['number']:'10';
		$data->ListLtype = isset($_GET['listType'])?$_GET['listType']:'0';
		$data->SearField = 'id';
		$data->Field = 'cate_id';
		return $data->JsonDatas();
	}
	
}